package com.zgm.ch04._6_2;

import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

public class ObscenityCleaningDemo {
	
	public static void main(String[] args){
		ConfigurableListableBeanFactory beanFactory = new XmlBeanFactory(new ClassPathResource("com/zgm/ch04/_6_2/_6_2-context.xml"));
		
		BeanFactoryPostProcessor bfpp = (BeanFactoryPostProcessor) beanFactory.getBean("bfpp");
		bfpp.postProcessBeanFactory(beanFactory);
		
		System.out.println(beanFactory.getBean("simpleBean"));
	}

}
